﻿<Window x:Class="ProjectDownloader.YoutubeDownloadWnd"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Youtube Download" MinHeight="250" Height="Auto" Width="450" ResizeMode="CanMinimize" 
        SizeToContent="Height" Icon="/Resources/YouTubeDownloadIcon_small.png">
    <Window.Resources>
        <Style TargetType="Button" BasedOn="{StaticResource DefaultButtonStyle}">
            <Setter Property="BorderThickness" Value="1" />
            <Setter Property="BorderBrush" Value="#aaa" />
        </Style>
    </Window.Resources>
    
    <Grid Margin="10">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <Grid Grid.ColumnSpan="2" Margin="0,0,0,5">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <Label>Video url:</Label>
            <TextBox Grid.Column="1" Name="txtVideoUrl" />
        </Grid>

        <StackPanel Grid.Row="1">
            <Image Name="imgThumbnail" Source="/Resources/YouTubeThumbnailPlaceholder.png" Width="175" Height="98" />
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,10,0,0">
                <ComboBox Name="cbxFormat" SelectionChanged="cbxFormat_SelectionChanged" />
                <ComboBox Name="cbxResolution" SelectionChanged="cbxResolution_SelectionChanged" />
            </StackPanel>            
        </StackPanel>

        <StackPanel Grid.Row="1" Grid.Column="2" Margin="5,0,0,5" Background="#f3f3f3">
            <TextBlock Name="txtblTitle" Padding="5" TextWrapping="Wrap">
                Retrieving video data...
            </TextBlock>
            <TextBlock Name="txtblChannel" Padding="5" />
            <Label Name="lblLength" />
            <Label Name="lblVideoSize" />
        </StackPanel>
        
        <ProgressBar Name="pbGettingData" Grid.Row="2" IsIndeterminate="True" Height="2" BorderThickness="0" />
        
        <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.Column="2" HorizontalAlignment="Right">
            <Button Name="btnCopyLink" Click="btnCopyLink_Click" Margin="0,0,5,0">Copy link</Button>
            <Button Name="btnRefresh" Click="btnRefresh_Click" Margin="0,0,5,0">Refresh</Button>
            <Button Name="btnDownload" Click="btnDownload_Click" Foreground="#f3f3f3" 
                    Background="#345">Download</Button>
        </StackPanel>
    </Grid>
</Window>
